<?php
	include 'header.php';
?>
	<link href="CSS.css" rel="stylesheet" type="text/css"/>
	<center><h1>List of Orders</h1><br />
	<table border="1">
		<tr>
			<td>ID Article</td>
			<td>Name an article</td>
			<td>Groups</td>
			<td>Date of orders</td>
			<td>Date of delivery</td>
			<td>Price</td>
		</tr>
	<?php 
		$connect=mysqli_connect('localhost','hristo9153','1111111','sells',3306);
		if(!$connect){
					echo 'connection failed';
					exit;
		}
		$select_all='SELECT * FROM orders';
		$query=mysqli_query($connect,$select_all);
		if(!$query){
			echo mysqli_error($connect);
		}
		while($print=mysqli_fetch_assoc($query)){
		 echo  '<tr>
					<td>'.$print['id_article'].'</td>
					<td>'.$print['name_article'].'</td>
					<td>'.$print['groups'].'</td>
					<td>'.$print['date_order'].'</td>
					<td>'.$print['date_delivery'].'</td>
					<td>'.$print['price'].'</td>
					</tr>';
		}
		
	?>
	</table><br />
	</div>
	</div>
	<a href="insert.php">"Insert orders"</a><br />
	<a href="new_account.php">"Created new account"</a><br />
	<a href="session_destroy.php">"EXIT"</a>
	</center>
<?php
	include 'footer.php';
?>